const Mock = require('mockjs')
const fs = require('fs')

const data = Mock.mock({
    'list|2': [
        {
            'title': '@ctitle(4,5)',
            'children|5': [
                {
                    'img': '@image(50x50, @color)',
                    'number|2': /\d{5,10}\-/,
                    'word': '@cword(10,20)'
                }
            ]
        }
    ]
})

fs.writeFileSync('./data.json', JSON.stringify(data.list))